Skip to content

cli: clarify event overview/timeline/list --ai-help to prevent unreachable polling predicates#297

Merged
maximelb merged 1 commit into
cli-v2from
cli-v2-event-help-clarify
May 25, 2026
Merged

cli: clarify event overview/timeline/list --ai-help to prevent unreachable polling predicates#297
maximelb merged 1 commit into
cli-v2from
cli-v2-event-help-clarify

Conversation

@maximelb
Copy link
Copy Markdown
Contributor

Summary

  • event overview --ai-help now shows the actual output shape (flat list of ms-epoch timestamps; empty is []) and an explicit "do not use this for sampling event content or for predicates keyed on in-payload fields — those are unreachable, you will spin until timeout."
  • event timeline --ai-help (alias) points at the expanded overview text.
  • event list --ai-help notes the empty result is the literal [] and that the structural empty-check is the reliable presence predicate — not greping for in-payload substrings.

Why

A real AI onboarding session burned its full 5-minute foreground-Bash timeout polling limacharlie event overview ... | grep -q event_type. That predicate is unreachable by construction — event overview returns only millisecond-epoch timestamp buckets, no event content. The previous --ai-help said overview gave a "high-level summary of event activity" without showing the output shape, which an AI can reasonably read as "richer than just timestamps" and pick wrong.

This change makes the right choice obvious to any AI reading --ai-help cold:

  • "I want to sample an event to inspect its content" → event list --limit N
  • "I want to know if anything arrived yet" → either command, but compare against [], not in-payload substrings

Notes

  • No behavior change; --ai-help text only.
  • No test changes; no existing tests reference the explain strings.
  • Verified --ai-help renders end-to-end via python -m limacharlie event overview --ai-help.

Test plan

  • limacharlie event overview --ai-help shows the new output-shape section + "do not use" callouts
  • limacharlie event timeline --ai-help (alias) points at overview's expanded help
  • limacharlie event list --ai-help mentions empty = [] and the structural empty-check rule

…hable polling predicates

A real AI session burned its full 5-minute foreground-Bash timeout polling
"event overview" with `grep -q event_type` — a predicate unreachable by
construction because overview returns only millisecond-epoch timestamp
buckets, no event content. The previous --ai-help said overview gave a
"high-level summary of event activity" without showing the output shape,
which an AI can reasonably read as "richer than just timestamps".

This commit extends the three relevant explain blocks so any AI reading
--ai-help cold can pick the right tool the first time:

- event overview: shows the actual output shape (flat list of ms epochs),
  what empty looks like (`[]`), what overview is good for, and an explicit
  "do not use this for sampling content or for predicates keyed on
  in-payload fields — those are unreachable, you will spin until timeout."

- event timeline: alias, points at event overview's expanded text.

- event list: notes the empty result is the literal `[]` and that
  structural empty-vs-non-empty against `[]` is the reliable presence
  predicate — not greping for in-payload strings.

No behavior change; --ai-help text only.
@maximelb maximelb requested a review from dzimine-lc May 25, 2026 15:06
@maximelb maximelb marked this pull request as ready for review May 25, 2026 15:06
@maximelb maximelb merged commit 2e5f46d into cli-v2 May 25, 2026
6 of 7 checks passed
@maximelb maximelb deleted the cli-v2-event-help-clarify branch May 25, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant